home *** CD-ROM | disk | FTP | other *** search
- *** bison.simple.orig Wed May 13 19:46:10 1992
- --- bison.simple Wed May 13 19:46:08 1992
- ***************
- *** 38,43 ****
- --- 38,50 ----
- #endif /* not GNU C. */
- #endif /* alloca not defined. */
-
- + #ifdef atarist
- + #include <stdlib.h>
- + #include <string.h>
- + #include <unistd.h>
- + #include <memory.h>
- + #endif /* atarist */
- +
- /* This is the parser code that is written into each bison parser
- when the %semantic_parser declaration is not specified in the grammar.
- It was written by Richard Stallman by simplifying the hairy parser
- *** files.c.orig Wed May 13 19:46:29 1992
- --- files.c Wed May 13 19:46:26 1992
- ***************
- *** 68,73 ****
- --- 68,76 ----
- extern int verboseflag;
- extern int definesflag;
- int fixed_outfiles = 0;
- + #ifdef atarist
- + long _stksize = -1L;
- + #endif
-
-
- char*
- ***************
- *** 115,126 ****
- #endif
- int tmp_len;
-
- ! #ifdef MSDOS
- ! tmp_base = getenv ("TMP");
- if (tmp_base == 0)
- tmp_base = "";
- strlwr (infile);
- ! #endif /* MSDOS */
-
- tmp_len = strlen (tmp_base);
-
- --- 118,130 ----
- #endif
- int tmp_len;
-
- ! #if defined(MSDOS) || defined(atarist)
- ! tmp_base = getenv ("TEMP");
- ! if(tmp_base == 0) tmp_base = getenv("TMP");
- if (tmp_base == 0)
- tmp_base = "";
- strlwr (infile);
- ! #endif /* MSDOS || atarist */
-
- tmp_len = strlen (tmp_base);
-
- ***************
- *** 129,137 ****
- /* -o was specified. The precise -o name will be used for ftable.
- For other output files, remove the ".c" or ".tab.c" suffix. */
- name_base = spec_outfile;
- ! #ifdef MSDOS
- strlwr (name_base);
- ! #endif /* MSDOS */
- /* BASE_LENGTH includes ".tab" but not ".c". */
- base_length = strlen (name_base);
- if (!strcmp (name_base + base_length - 2, ".c"))
- --- 133,141 ----
- /* -o was specified. The precise -o name will be used for ftable.
- For other output files, remove the ".c" or ".tab.c" suffix. */
- name_base = spec_outfile;
- ! #if defined(MSDOS) || defined(atarist)
- strlwr (name_base);
- ! #endif /* MSDOS || atarist */
- /* BASE_LENGTH includes ".tab" but not ".c". */
- base_length = strlen (name_base);
- if (!strcmp (name_base + base_length - 2, ".c"))
- ***************
- *** 154,160 ****
- /* Append `.tab'. */
- strcpy (name_base, spec_file_prefix);
- strcat (name_base, ".tab");
- ! #ifdef MSDOS
- strlwr (name_base);
- #endif /* MSDOS */
- }
- --- 158,164 ----
- /* Append `.tab'. */
- strcpy (name_base, spec_file_prefix);
- strcat (name_base, ".tab");
- ! #if defined(MSDOS) || defined(atarist)
- strlwr (name_base);
- #endif /* MSDOS */
- }
- ***************
- *** 175,185 ****
- #ifdef VMS
- name_base = stringappend(name_base, short_base_length, "_tab");
- #else
- ! #ifdef MSDOS
- name_base = stringappend(name_base, short_base_length, "_tab");
- #else
- name_base = stringappend(name_base, short_base_length, ".tab");
- ! #endif /* not MSDOS */
- #endif
- base_length = short_base_length + 4;
- }
- --- 179,189 ----
- #ifdef VMS
- name_base = stringappend(name_base, short_base_length, "_tab");
- #else
- ! #if defined(MSDOS) || defined(atarist)
- name_base = stringappend(name_base, short_base_length, "_tab");
- #else
- name_base = stringappend(name_base, short_base_length, ".tab");
- ! #endif /* not MSDOS || atarist */
- #endif
- base_length = short_base_length + 4;
- }
- ***************
- *** 187,195 ****
- finput = tryopen(infile, "r");
-
- filename = getenv("BISON_SIMPLE");
- ! #ifdef MSDOS
- /* File doesn't exist in current directory; try in INIT directory. */
- cp = getenv("INIT");
- if (filename == 0 && cp != 0)
- {
- filename = malloc(strlen(cp) + strlen(PFILE) + 2);
- --- 191,203 ----
- finput = tryopen(infile, "r");
-
- filename = getenv("BISON_SIMPLE");
- ! #if defined(MSDOS) || defined(atarist)
- /* File doesn't exist in current directory; try in INIT directory. */
- + #ifdef atarist
- + cp = getenv("GNULIB");
- + #else
- cp = getenv("INIT");
- + #endif
- if (filename == 0 && cp != 0)
- {
- filename = malloc(strlen(cp) + strlen(PFILE) + 2);
- ***************
- *** 203,209 ****
-
- if (verboseflag)
- {
- ! #ifdef MSDOS
- outfile = stringappend(name_base, short_base_length, ".out");
- #else
- if (spec_name_prefix)
- --- 211,217 ----
-
- if (verboseflag)
- {
- ! #if defined(MSDOS) || defined(atarist)
- outfile = stringappend(name_base, short_base_length, ".out");
- #else
- if (spec_name_prefix)
- ***************
- *** 220,226 ****
- fdefines = tryopen(defsfile, "w");
- }
-
- ! #ifdef MSDOS
- actfile = mktemp(stringappend(tmp_base, tmp_len, "acXXXXXX"));
- tmpattrsfile = mktemp(stringappend(tmp_base, tmp_len, "atXXXXXX"));
- tmptabfile = mktemp(stringappend(tmp_base, tmp_len, "taXXXXXX"));
- --- 228,234 ----
- fdefines = tryopen(defsfile, "w");
- }
-
- ! #if defined(MSDOS) || defined(atarist)
- actfile = mktemp(stringappend(tmp_base, tmp_len, "acXXXXXX"));
- tmpattrsfile = mktemp(stringappend(tmp_base, tmp_len, "atXXXXXX"));
- tmptabfile = mktemp(stringappend(tmp_base, tmp_len, "taXXXXXX"));
- ***************
- *** 234,240 ****
- fattrs = tryopen(tmpattrsfile,"w+");
- ftable = tryopen(tmptabfile, "w+");
-
- ! #ifndef MSDOS
- unlink(actfile);
- unlink(tmpattrsfile);
- unlink(tmptabfile);
- --- 242,248 ----
- fattrs = tryopen(tmpattrsfile,"w+");
- ftable = tryopen(tmptabfile, "w+");
-
- ! #if !(defined(MSDOS) || defined(atarist))
- unlink(actfile);
- unlink(tmpattrsfile);
- unlink(tmptabfile);
- ***************
- *** 250,256 ****
- attrsfile = stringappend(name_base, short_base_length, "_stype.h");
- guardfile = stringappend(name_base, short_base_length, "_guard.c");
- #else
- ! #ifdef MSDOS
- attrsfile = stringappend(name_base, short_base_length, ".sth");
- guardfile = stringappend(name_base, short_base_length, ".guc");
- #else
- --- 258,264 ----
- attrsfile = stringappend(name_base, short_base_length, "_stype.h");
- guardfile = stringappend(name_base, short_base_length, "_guard.c");
- #else
- ! #if defined(MSDOS) || defined(atarist)
- attrsfile = stringappend(name_base, short_base_length, ".sth");
- guardfile = stringappend(name_base, short_base_length, ".guc");
- #else
- ***************
- *** 275,283 ****
- fclose(fparser);
-
- filename = (char *) getenv ("BISON_HAIRY");
- ! #ifdef MSDOS
- /* File doesn't exist in current directory; try in INIT directory. */
- cp = getenv("INIT");
- if (filename == 0 && cp != 0)
- {
- filename = malloc(strlen(cp) + strlen(PFILE1) + 2);
- --- 283,295 ----
- fclose(fparser);
-
- filename = (char *) getenv ("BISON_HAIRY");
- ! #if defined(MSDOS) || defined(atarist)
- /* File doesn't exist in current directory; try in INIT directory. */
- + #ifdef atarist
- + cp = getenv("GNULIB");
- + #else
- cp = getenv("INIT");
- + #endif
- if (filename == 0 && cp != 0)
- {
- filename = malloc(strlen(cp) + strlen(PFILE1) + 2);
- ***************
- *** 366,372 ****
- if (k==0) sys$exit(SS$_NORMAL);
- sys$exit(SS$_ABORT);
- #else
- ! #ifdef MSDOS
- if (actfile) unlink(actfile);
- if (tmpattrsfile) unlink(tmpattrsfile);
- if (tmptabfile) unlink(tmptabfile);
- --- 378,384 ----
- if (k==0) sys$exit(SS$_NORMAL);
- sys$exit(SS$_ABORT);
- #else
- ! #if defined(MSDOS) || defined(atarist)
- if (actfile) unlink(actfile);
- if (tmpattrsfile) unlink(tmpattrsfile);
- if (tmptabfile) unlink(tmptabfile);
- *** reader.c.orig Wed May 13 19:47:03 1992
- --- reader.c Wed May 13 23:11:14 1992
- ***************
- *** 52,58 ****
- extern int expected_conflicts;
- extern char *token_buffer;
-
- ! #ifndef MSDOS
- extern char *realloc ();
- #endif
-
- --- 52,58 ----
- extern int expected_conflicts;
- extern char *token_buffer;
-
- ! #if !(defined(MSDOS) || defined(atarist))
- extern char *realloc ();
- #endif
-
- ***************
- *** 901,907 ****
- case '/':
- putc(c, fguard);
- c = getc(finput);
- ! if (c != '*' && c != '/');
- continue;
-
- cplus_comment = (c == '/');
- --- 901,907 ----
- case '/':
- putc(c, fguard);
- c = getc(finput);
- ! if (c != '*' && c != '/')
- continue;
-
- cplus_comment = (c == '/');
- *** system.h.orig Wed May 13 19:47:12 1992
- --- system.h Wed May 13 18:44:37 1992
- ***************
- *** 1,3 ****
- --- 1,10 ----
- + #ifdef atarist
- + #include <stdlib.h>
- + #include <unistd.h>
- + #include <memory.h>
- + #include <string.h>
- + #endif
- +
- #ifdef MSDOS
- #include <stdlib.h>
- #include <io.h>
-